<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main"><i class="glyphicon glyphicon-modal-window"></i> 设备管理</a></li>
        <li><a ui-sref="main.dm.warn.list" class="active" ng-bind="title"></a></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>
<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-heading clearfix">
                <div class="w-auto">
                   <form class="form-inline">
                        <div class="form-group">
						    <label for="startTime" class="search_lable">时间：</label>
                            <input type="text" class="form-control" style="width: 180px" title="时间格式为 YYYY-MM-DD" id="startTime" name="startTime" placeholder="请输入起始时间..." ng-model="param.startTime">
                            <span>~</span>
                            <input type="text" class="form-control" title="时间格式为 YYYY-MM-DD"  style="width: 180px" id="endTime" name="endTime" placeholder="请输入结束时间..." ng-model="param.endTime">
                            <label for="endTime" class="search_lable">设备编号：</label>
                            <input type="text" class="form-control" style="width: 180px" id="deviceCode" name="deviceCode" 
                                placeholder="请输入设备编号..." ng-model="param.deviceCode">
                        </div>
                        <div class="form-group">
                            <label for="" class="search_lable">房屋地址：</label> 
                            <select name="real" ng-change="getarea()" ng-model="icity.code_" id="city">
                                <option value='' class="placehol" disabled selected style='display:none;'>市</option>
                                <option ng-repeat="icity in city" value="{{$index}}" data-code="{{icity.code_}}" ng-bind="icity.code_text"></option>
                            </select>
                            <select name="real" id="area" ng-change="getStree()" ng-model="iarea.code_" disabled="disabled">
                                <option value='' class="placehol" disabled selected style='display:none;'>区</option>
                                <option ng-repeat="iarea in area" value="{{$index}}" data-code="{{iarea.code_}}" ng-bind="iarea.code_text"></option>
                            </select>
                            <select name="real" id="street" ng-change="getRoad()" ng-model="istree.code_" disabled="disabled">
                                <option value='' class="placehol" disabled selected style='display:none;'>街道</option>
                                <option ng-repeat="istree in street"value="{{$index}}" data-code="{{istree.code_}}" ng-bind="istree.code_text"></option>
                            </select>
                            <select name="real" id="road"ng-change="getQuarters()" ng-model="iroad.code_" disabled="disabled">
                                <option value='' class="placehol" disabled selected style='display:none;'>路</option>
                                <option   ng-repeat="iroad in road"value="{{$index}}" data-code="{{iroad.code_}}" ng-bind="iroad.code_text"></option>
                            </select>
                            <select name="real" id="cunty"ng-change="getDevice()" ng-model="icunty.code_" disabled="disabled">
                                <option value='' class="placehol" disabled selected style='display:none;'>村/小区</option>
                                <option   ng-repeat="icunty in cunty"value="{{$index}}" data-code="{{icunty.code_}}" ng-bind="icunty.code_text"></option>
                            </select>
                          
						</div>
						
						<div class="form-group" style="margin-left: 10px">
							<button type="button" ng-click="keySearch()" class="btn btn-primary new-primary" ng-show="read">查询</button>
                            <button type="button" class="btn btn-primary new-primary" ng-show="read">导出</button>
						</div>
					</form>
                </div>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                    	<th>时间</th>
                    	<th>设备编号</th>
                    	<th>设备名称</th>
                    	<th>楼栋地址</th>
                    	<th>产品名称</th>
                    	<!-- <th>房屋地址</th> -->
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.data">
                        <td class="v-middle">{{item.create_time}}</td>
                        <td class="v-middle">{{item.deviceCode}}</td>
                        <td class="v-middle">{{item.deviceName}}</td> 
                        <td class="v-middle">{{item.buildingAddress}}</td>
                        <td class="v-middle">{{item.productName}}</td>
                        <!-- <td class="v-middle">{{item.deviceName}}</td> -->
						<td class="v-middle">
						  <span ng-if="item.status === '1'" style="color:#27c24c">在线</span>
                          <span ng-if="item.status == '0' " style="color: #f05050">离线</span>
						</td>
                    </tr>
                    </tbody>
                </table>
            </div>
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div>
        
    </div>
   
</div>

<style scoped>
label.search_lable{
    width: 80px;
    text-align: right;
}

select[name='real']{
    width: 125px;
    height: 34px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    padding-left:5px;
}
select option.placehol{
    optgroup: #dbc3c7!important; 
}

</style>